using System;
using System.Collections.Generic;
using System.Text;

using LoggingClient.NetworkLog;
using LoggingClient.ConsoleLog;

namespace LoggingClient
{
    public class Logger
    {
        ILogger logger = null;
        protected bool mInit = false;

        public void Init(string module)
        {
#if DEBUG
            logger = new NetworkLogger();
#else
            logger = new NetworkLogger();
#endif

            logger.Init(module);

            mInit = true;
        }

        public void Error(object obj)
        {
            if (mInit)
            {
                logger.Error(obj);
            }
        }

        public void Info(object obj)
        {
            if (mInit)
            {
                logger.Info(obj);
            }
        }

        public void Debug(object obj)
        {
            if (mInit)
            {
                logger.Debug(obj);
            }
        }

        public void Indent()
        {
            if (mInit)
            {
                logger.Indent();
            }
        }
        public void Unindent()
        {
            if (mInit)
            {
                logger.Unindent();
            }
        }
    }
}
